﻿
@using Model
@model EFEntity.Esalary_standard

<link href="~/lib/bootstrap/dist/css/bootstrap.css" rel="stylesheet" />
<script src="~/Scripts/jquery-1.10.2.js"></script>
<link href="~/css/site.css" rel="stylesheet" />
<script src="~/lib/jquery-validation/dist/jquery.validate.js"></script>
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js"></script>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link rel="stylesheet"
          href="../../css/table.css" type="text/css" />
    <title>无标题文档</title>
    <style>
        .TD_STYLE1{
            background-color:darkgray
        }
    </style>
</head>
@* ***************薪酬复核******************** *@
<body>
    <div id="app"></div>
    <form asp-action="salarystandard_change" method="post">

        <table width="100%">
            <tr>
                <td>
                    <font color="black">您正在做的业务是:人力资源管理--薪酬标准管理--薪酬标准登记复核</font>
                </td>
            </tr>
            <tr>
                <td>
                    <div align="right">
                        <input type="submit" value="提交" class="btn-default">
                        <input type="button" value="返回" onclick="history.back();"
                               class="btn-default">
                    </div>
                </td>
            </tr>
        </table>

        <input type="hidden" name="standard.ssdId" value="1238">
        <div asp-validation-summary="ModelOnly" class="text-danger"></div>
        <table width="100%" border="1" cellpadding=0 cellspacing=1
               bordercolorlight=#848284 bordercolordark=#eeeeee
               class="table-hover">
            <tr>
                <td width="12%" class="TD_STYLE1">
                    <label asp-for="standard_id" class="control-label"></label>
                </td>
                <td width="15%" class="TD_STYLE2">

                    <input asp-for="standard_id" readonly class="form-control" />
                    <span asp-validation-for="standard_id" class="text-danger"></span>

                </td>
                <td width="12%" class="TD_STYLE1">
                    <label asp-for="standard_name" class="control-label"></label>
                </td>
                <td width="11%" class="TD_STYLE2">
                    <input asp-for="standard_name" class="form-control" />
                    <span asp-validation-for="standard_name" class="text-danger"></span>
                </td>
                <td width="11%" class="TD_STYLE1">
                    <label asp-for="salary_sum" class="control-label"></label>
                </td>
                <td width="17%" class="TD_STYLE2">
                    <input asp-for="salary_sum" readonly="readonly" class="form-control" id="sumSalary" />
                    <span asp-validation-for="salary_sum" class="text-danger"></span>
                </td>
                <td width="12%" class="TD_STYLE1">
                    <label asp-for="ssd_id" class="control-label"></label>
                </td>
                <td width="10%" class="TD_STYLE2">
                    <input asp-for="ssd_id" readonly="readonly" class="form-control" id="sumSalary" />
                    <span asp-validation-for="ssd_id" class="text-danger"></span>
                </td>
            </tr>
            <tr>
                <td class="TD_STYLE1">
                    <label asp-for="designer" class="control-label"></label>
                </td>
                <td class="TD_STYLE2">
                    <input asp-for="designer" class="form-control" />
                    <span asp-validation-for="designer" class="text-danger"></span>
                </td>
                <td class="TD_STYLE1">
                    <label asp-for="checker" class="control-label"></label>
                </td>
                <td class="TD_STYLE2">
                    <input asp-for="checker" class="form-control" />
                    <span asp-validation-for="checker" class="text-danger"></span>
                </td>
                <td class="TD_STYLE1">
                    复核时间
                </td>
                <td class="TD_STYLE2">
                    <input type="text" id="Tdate" name="standard.registTime" readonly="readonly" class="INPUT_STYLE2">
                </td>
                <td class="TD_STYLE1">
                    &nbsp;
                </td>
                <td class="TD_STYLE2">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="TD_STYLE1">
                    <label asp-for="check_comment" class="control-label"></label>
                </td>
                <td colspan="7" class="TD_STYLE2">
                    <input asp-for="check_comment" class="form-control" />
                    <span asp-validation-for="check_comment" class="text-danger"></span>
                </td>
            </tr>

            <tr>
                <td class="TD_STYLE1">
                    序号
                </td>
                <td colspan="3" class="TD_STYLE1">
                    薪酬项目名称
                </td>
                <td colspan="4" class="TD_STYLE1">
                    金额
                </td>
            </tr>
            <tbody id="tbody">
                @foreach (salary_standard_details item in ViewBag.s)
                {
                    <tr class="TD_STYLE2">
                        <td align="center" style="background-color:darkgray">
                            @item.item_id
                        </td>
                        <td colspan="3">
                            @item.item_name
                        </td>
                        <td>
                            <input type="text" asp-for="@item.salary" readonly="readonly" class="INPUT_STYLE2">
                        </td>
                        <td colspan="3">
                            &nbsp;
                        </td>
                    </tr>
                }
            </tbody>

        </table>
    </form>
    <script type="text/javascript">
        function countMoney(obj, o) {

            if (isNaN(document.getElementById(o).value) || document.getElementById(o).value < 0) {
                alert("金额填写错误!");
                document.getElementById(o).value = "0.00";
                return;
            }
            var sum = 0;
            for (var i = 1; i <= obj; i++) {
                var salary = document.getElementById("salary" + i);
                if (salary.value == "") {
                    salary.value = "0.00";
                }
                sum = Number(sum) + Number(salary.value);

            }
            document.getElementById("sumSalary").value = sum;

        }
        function time() {
            var tdate = document.getElementById("Tdate");
            var d = new Date();
            var y = d.getFullYear();
            var moth = d.getMonth() + 1;
            var date = d.getDate();
            var h = d.getHours();
            var m = d.getMinutes();
            var s = d.getSeconds();
            var hh = 20 - 1 - h;
            var mm = 60 - 1 - m;
            var ss = 60 - s;
            if (hh > 0) {
                mm = mm + 60 * hh;
            }
            if (moth < 10) {
                moth = "0" + moth;
            }
            if (date < 10) {
                date = "0" + date;
            }
            if (h < 10) {
                h = "0" + h;
            }
            if (m < 10) {
                m = "0" + m;
            }
            if (s < 10) {
                s = "0" + s;
            }
            if (mm < 10) {
                mm = "0" + mm;
            }
            if (ss < 10) {
                ss = "0" + ss;
            }

            tdate.value = y + "-" + moth + "-" + date + " " + h + ":" + m + ":" + s;

        }
        window.onload = time;
        var out = window.setInterval(time, 1000);
    </script>
</body>
</html>

